<div ng-init="init();" class="kmi-layout-content mobile01-content">
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <i class="material-icons">&#xE408;</i>
            <div class="kmi-can-click"></div>
        </div>
        <div class="header-title" ng-bind="'mobile01.title' | translate"></div>
    </div>
    <div class="kmi-layout-main-content system-info">
        <div class="kmi-row-fields" style="padding: 4px 8px;">
            <div class="column-item left">
                <label class="label" ng-bind="'home.onwork_time' | translate"></label>
                <label class="value" ng-bind="onwork_time"></label>
            </div>
            <div class="column-item right">
                <label class="label" ng-bind="'home.machine_count' | translate"></label>
                <label class="value" ng-bind="machines_length"></label>
            </div>
        </div>
        <div class="kmi-row-fields qr-code" style="border-bottom:1px #cecece solid;padding-bottom: 8px;">
            <div class="column-item">
                <img src="image/icons/search.png"></img> 
                <input mdl-barcode="input_plot_no(barcode);" style="margin-left: 8px;"/>
                <div class="tip qrcode" ng-click="QRCodeScanner();">
                    <img src="image/icons/QRCode.png">
                </div>
            </div>
        </div>
        <div class="kmi-tab-content" style="border-bottom:1px #cecece solid;">
            <div class="tab" ng-click="changeTab($index)" ng-class="{'is-select':status.select}"
                ng-repeat="status in status_list">
                <label ng-bind="status.name+'('+getTabSize(status.value)+')'" ></label>
                <div class="kmi-can-click"></div>
            </div>
        </div>
        <div class="kmi-tab-contenters" contenter-data="status_list">
            <div class="kmi-list tab-contenter">
                <div class="kmi-list__row-content">
                    <div class="row-content" ng-repeat="item in items | filter:{'status':status.value, 'plot_no': barcode_plot_no_filter} track by $index">
                        <div class="kmi-row-fields" style="margin-bottom: 6px;">
                            <div class="column-item left row-title" ng-bind="item.plot_no"></div>
                            <div class="column-item right" style="align-items: center;flex:initial;">
                                <div class="task-load-tag" ng-bind="$index+1"></div>
                            </div>
                        </div>
                        <div class="kmi-row-fields">
                            <div class="column-item left" ng-bind="('mobile01.item_name'| translate)+item.item_name"></div>
                        </div>
                        <div class="kmi-row-fields">
                            <div class="column-item left" ng-bind="('mobile01.op_display'| translate)+item.op_no + '(' + item.op_name + ')'"></div>
                        </div>
                        <div class="kmi-row-fields" style="margin-bottom: 8px;">
                            <!-- 20221031 modify by Alan for M#120992: 修正單位綁定變數名稱 -->
                            <div class="column-item left" ng-bind="('mobile01.qty'| translate)+item.qty+item.unit_no"></div>
                        </div>
                        <div class="kmi-row-fields">
                            <div class="column-item left">
                                <!-- 20230303 modify by Alan for#0128964: -->
                                <button class="kmi-button__mobile" style="z-index:1;" ng-click="materialSetUp(item);" ng-show="permission.B0204 && MTL_OPB"> 
                                    <label ng-bind="'mobile01.materialSetUp' | translate"></label>
                                    <div class="kmi-can-click"></div>
                                </button>
                                <!-- 20230303 modify by Alan for#0128964: -->
                                <button class="kmi-button__mobile" style="z-index:1;" ng-click="materialSetDown(item);" ng-show="permission.B0220 && MTL_OPB">
                                    <label ng-bind="'mobile01.materialSetDown' | translate"></label>
                                    <div class="kmi-can-click"></div>
                                </button>
                                <button class="kmi-button__mobile" style="z-index:1;" ng-click="tagPrinter(item);" ng-show="permission.B0230">
                                    <label ng-bind="'mobile14.mini-title' | translate"></label>
                                    <div class="kmi-can-click"></div>
                                </button>
                                <button class="kmi-button__mobile" style="z-index:1;" ng-click="firstPieceCheck(item);" ng-show="permission.B0501">
                                    <label ng-bind="'mobile01.firstPieceCheck' | translate"></label>
                                    <div class="kmi-can-click"></div>
                                </button>
                            </div>
                            <div class="column-item right">
                            <button class="kmi-button__mobile" style="z-index:1;" ng-click="checkin(item);" ng-show="item.status == 'Q' && permission.B0205">
                                <label ng-bind="'mobile01.check_in' | translate"></label>
                                <div class="kmi-can-click"></div>
                            </button>
                            <button class="kmi-button__mobile" style="z-index:1;" ng-click="checkout(item);" ng-show="item.status == 'R' && permission.B0206">
                                <label ng-bind="'mobile01.check_out' | translate"></label>
                                <div class="kmi-can-click"></div>
                            </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
